﻿<div class="tab-pane" id="bill_bailu">
    <div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
        <h1 class="page-header">白露流水账</h1>
             <h6><button type="button" class="btn btn-success btn-xs" data-toggle="modal" data-target="#additembailu"><span class="glyphicon glyphicon-plus-sign"></span> 添加单据</button></h6>
            
             <div class="modal fade" id="additembailu" tabindex="-1" role="dialog" aria-labelledby="additem" aria-hidden="true">
                <div class="modal-dialog">
                 <div class="modal-content">
                  <div class="modal-header">
                   <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
                   <h4 class="modal-title" id="additem"><span class="glyphicon glyphicon-plus-sign"></span> 添加白露流水账</h4>
                  </div>
                  <div class="modal-body">
                   <form class="form-horizontal" role="form">
                    <div class="form-group">
                     <label for="inputPassword3" class="col-sm-2 control-label"></label>
                     <div class="col-sm-10">
                      <div class="input-group">
                       <div class="input-group-addon">
                        <span class="glyphicon glyphicon-time"></span>
                       </div>
                       <input type="Texi" class="form-control" id="item-time-bailu" placeholder="时间"  value=" <?php echo date('Y-m-d H:i',time()); ?>">
                      </div>
                     </div>
                    </div>
                    <div class="form-group">
                     <label for="inputPassword3" class="col-sm-2 control-label"></label>
                     <div class="col-sm-10">
                      <div class="input-group">
                       <div class="input-group-addon">
                        <span class="glyphicon glyphicon-user"></span>
                       </div>
                       <input type="Texi" class="form-control" id="vid-item-bailu" placeholder="会员号">
                      </div>
                     </div>
                    </div>
                    <div class="form-group">
                     <label for="inputPassword3" class="col-sm-2 control-label"></label>
                     <div class="col-sm-10">
                      <div class="input-group">
                       <div class="input-group-addon">
                        <span class="glyphicon glyphicon-usd"></span>
                       </div>
                       <input type="Texi" class="form-control" id="vip-rewards-bailu" placeholder="使用积分">
                      </div>
                     </div>
                    </div>
                    <div class="form-group">
                     <label for="inputPassword3" class="col-sm-2 control-label"></label>
                     <div class="col-sm-10">
                      <div class="input-group">
                       <div class="input-group-addon">
                        <span class="glyphicon glyphicon-shopping-cart"></span>
                       </div>
                       <input type="Texi" class="form-control" id="item-bailu" placeholder="商品">
                      </div>
                     </div>
                    </div>
                    <div class="form-group">
                     <label for="inputPassword3" class="col-sm-2 control-label"></label>
                     <div class="col-sm-10">
                      <div class="input-group">
                       <div class="input-group-addon">
                        <span class="glyphicon glyphicon-th-list"></span>
                       </div>
                       <select class="form-control" id="item-type-bailu" placeholder="分类">
                        <option>电脑配件</option>
                        <option>键盘/鼠标/摄像头</option>
                        <option>网络/监控产品</option>
                        <option>音响/耳机/麦克风</option>
                        <option>线材/耗材/鼠标垫</option>
                        <option>服务费</option>
                        <option>代缴费</option>
                        <option>打印机</option>
                        <option>平板/机顶盒</option>
                        <option style="background-color: red;color: #FFFFFF;">免费上门</option>
                        <option>其他</option>
                      </select>
                      </div>
                     </div>
                    </div>
                    <div class="form-group">
                     <label for="inputPassword3" class="col-sm-2 control-label"></label>
                     <div class="col-sm-10">
                      <div class="input-group">
                       <div class="input-group-addon">
                        <span class="glyphicon glyphicon-th-list"></span>
                       </div>
                       <select class="form-control" id="item-m-price-bailu" placeholder="交易方式">
                        <option>现金</option>
                        <option>未付</option>
                      </select>
                      </div>
                     </div>
                    </div>
                    <div class="form-group">
                     <label for="inputPassword3" class="col-sm-2 control-label"></label>
                     <div class="col-sm-10">
                      <div class="input-group">
                       <div class="input-group-addon">
                        <span class="glyphicon glyphicon-usd"></span>
                       </div>
                       <input type="Texi" class="form-control" id="item-price-bailu" placeholder="价格">
                      </div>
                     </div>
                    </div>
                    <div class="form-group">
                     <label for="inputPassword3" class="col-sm-2 control-label"></label>
                     <div class="col-sm-10">
                      <div class="input-group">
                       <div class="input-group-addon">
                        <span class="glyphicon glyphicon-user"></span>
                       </div>
                       <input type="Texi" class="form-control" id="item-name-bailu" placeholder="经手人" disabled="disabled" value="<?php echo $_SESSION['username']; ?>">
                      </div>
                     </div>
                    </div>
                   </form>
                  </div>
                  <div class="modal-footer">
                      <label for="inputPassword3" class="alert alert-danger control-label"><a style="color:red;" class="label" id="query_vip_var_bailu" onclick="query_vip_var('bailu');">查询积分</a></label>
                   <button type="button" class="btn btn-default" data-dismiss="modal"><span class="glyphicon glyphicon-remove"></span> 关闭</button>
                   <button type="button" class="btn btn-primary" onclick="item_add(this.value);" value="bailu"><span class="glyphicon glyphicon-ok"></span> 确定</button>
                  </div>
                 </div>
                </div>
               </div>

            <div class="row placeholders">
                <div class="row">
                    <h3 class="col-md-12">
                        <div class="col-md-4 query_num"><span><span class="glyphicon glyphicon-shopping-cart" style="color:orange;" aria-hidden="true"></span> 未确认<strong class="num" > <a href="#" style="color:orange;" 
                        <?php 
                        if ($_SESSION['userid'] == 1 || $_SESSION['userid'] == 7 || $_SESSION['userid'] == 6 || $_SESSION['userid'] == 37)
                          { ?>
                            onclick="item_table_query('item-now-bailu','#item-bailu-info');"
                          <?php }
                        ?> id="item-time-num-bailu"><?php num('item_bailu','start','0'); ?></a> </strong>单</span></div>
                        <div class="col-md-4 query_num"><span><span class="glyphicon glyphicon-ok-sign" style="color:green;" aria-hidden="true"></span> 已确认<strong class="num"> <a  href="#" style="color:green;" 
                        <?php 
                        if ($_SESSION['userid'] == 1 || $_SESSION['userid'] == 7 || $_SESSION['userid'] == 6 || $_SESSION['userid'] == 37)
                          { ?>
                            onclick="item_table_query('item-ok-bailu','#item-bailu-info');"
                          <?php }
                        ?> id="item-ok-num-bailu"><?php num('item_bailu','start','1'); ?></a> </strong>单</span></div>
                        <div class="col-md-4 query_num"><span><span class="glyphicon glyphicon-remove-sign" style="color:red;" aria-hidden="true"></span> 已删除<strong class="num"> <a  href="#" style="color:red;" 
                        <?php 
                        if ($_SESSION['userid'] == 1 || $_SESSION['userid'] == 7 || $_SESSION['userid'] == 6 || $_SESSION['userid'] == 37)
                          { ?>
                            onclick="item_table_query('item-delete-bailu','#item-bailu-info');"
                         <?php }
                        ?> id="item-call-num-bailu"><?php num('item_bailu','start','2'); ?></a> </strong>单</span></div>
                    </h3>
                </div>
                  
            </div>
        <h2 class="sub-header">
            <button class="btn btn-danger" type="button">
              今日单数 <span class="badge" id="item-no-num-bailu"><?php num('item_bailu','time',date('Y-m-d',time())); ?></span>
              今日金额 <span class="badge" id="item-m-num-bailu"><?php ls_query('item_bailu',date('Y-m-d' )); ?></span>
            </button>
        </h2>
            <div class="table-responsive">
                <table class="table table-hover">
                    <thead>
                        <tr class="alert alert-info">
                            <th>时间</th>
                            <th>商品</th>
                            <th>类型</th>
                            <th>价格</th>
                            <th>交易方式</th>
                            <th>经手人</th>
                            <th>执行</th>
                        </tr>
                    </thead>
                    <tbody id="item-bailu-info">
                           <?php item_query("bailu"); ?>
                    </tbody>
                 </table>
            </div>
    </div>
</div>
